﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// abstract SanPhamBinhLuan typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class SanPhamBinhLuanDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<SanPhamBinhLuanDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.SanPhamBinhLuan _currentSanPhamBinhLuan = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxSanPhamBinhLuanDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxSanPhamBinhLuanErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxSanPhamBinhLuanBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the IDSanPhamBinhLuan property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDSanPhamBinhLuanDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDSanPham property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDSanPhamDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the TenSuDung property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxTenSuDungDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the TenNguoiDung property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxTenNguoiDungDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Email property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxEmailDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the NoiDung property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxNoiDungDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ThoiDiemCapNhat property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThoiDiemCapNhatDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.SanPham> _IDSanPhamList;
		
		/// <summary> 
		/// The list of selectable SanPham
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.SanPham> IDSanPhamList
		{
			get {return this._IDSanPhamList;}
			set 
			{
				this._IDSanPhamList = value;
				this.uxIDSanPhamDataGridViewColumn.DataSource = null;
				this.uxIDSanPhamDataGridViewColumn.DataSource = this._IDSanPhamList;
			}
		}
		
		private bool _allowNewItemInIDSanPhamList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of SanPham
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDSanPhamList
		{
			get { return _allowNewItemInIDSanPhamList;}
			set
			{
				this._allowNewItemInIDSanPhamList = value;
				this.uxIDSanPhamDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.SanPhamBinhLuan> _SanPhamBinhLuanList;
				
		/// <summary> 
		/// The list of SanPhamBinhLuan to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.SanPhamBinhLuan> SanPhamBinhLuanList
		{
			get {return this._SanPhamBinhLuanList;}
			set
			{
				this._SanPhamBinhLuanList = value;
				this.uxSanPhamBinhLuanBindingSource.DataSource = null;
				this.uxSanPhamBinhLuanBindingSource.DataSource = value;
				this.uxSanPhamBinhLuanDataGridView.DataSource = null;
				this.uxSanPhamBinhLuanDataGridView.DataSource = this.uxSanPhamBinhLuanBindingSource;				
				//this.uxSanPhamBinhLuanBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxSanPhamBinhLuanBindingSource_ListChanged);
				this.uxSanPhamBinhLuanBindingSource.CurrentItemChanged += new System.EventHandler(OnSanPhamBinhLuanBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnSanPhamBinhLuanBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentSanPhamBinhLuan = uxSanPhamBinhLuanBindingSource.Current as Entities.SanPhamBinhLuan;
			
			if (_currentSanPhamBinhLuan != null)
			{
				_currentSanPhamBinhLuan.Validate();
			}
			//_SanPhamBinhLuan.Validate();
			OnCurrentEntityChanged();
		}

		//void uxSanPhamBinhLuanBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.SanPhamBinhLuan"/> instance.
		/// </summary>
		public Entities.SanPhamBinhLuan SelectedSanPhamBinhLuan
		{
			get {return this._currentSanPhamBinhLuan;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxSanPhamBinhLuanDataGridView.VirtualMode;}
			set
			{
				this.uxSanPhamBinhLuanDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxSanPhamBinhLuanDataGridView.AllowUserToAddRows;}
			set {this.uxSanPhamBinhLuanDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxSanPhamBinhLuanDataGridView.AllowUserToDeleteRows;}
			set {this.uxSanPhamBinhLuanDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxSanPhamBinhLuanDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxSanPhamBinhLuanDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="SanPhamBinhLuanDataGridViewBase"/> class.
		/// </summary>
		public SanPhamBinhLuanDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxSanPhamBinhLuanDataGridView = new System.Windows.Forms.DataGridView();
			this.uxSanPhamBinhLuanBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxSanPhamBinhLuanErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDSanPhamBinhLuanDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDSanPhamDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxTenSuDungDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxTenNguoiDungDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxEmailDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxNoiDungDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxThoiDiemCapNhatDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDSanPhamBindingSource = new SanPhamBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDSanPhamBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxSanPhamBinhLuanDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxSanPhamBinhLuanBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxSanPhamBinhLuanErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxSanPhamBinhLuanErrorProvider
			// 
			this.uxSanPhamBinhLuanErrorProvider.ContainerControl = this;
			this.uxSanPhamBinhLuanErrorProvider.DataSource = this.uxSanPhamBinhLuanBindingSource;						
			// 
			// uxSanPhamBinhLuanDataGridView
			// 
			this.uxSanPhamBinhLuanDataGridView.AutoGenerateColumns = false;
			this.uxSanPhamBinhLuanDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxSanPhamBinhLuanDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDSanPhamBinhLuanDataGridViewColumn,
		this.uxIDSanPhamDataGridViewColumn,
		this.uxTenSuDungDataGridViewColumn,
		this.uxTenNguoiDungDataGridViewColumn,
		this.uxEmailDataGridViewColumn,
		this.uxNoiDungDataGridViewColumn,
		this.uxThoiDiemCapNhatDataGridViewColumn			});
			this.uxSanPhamBinhLuanDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxSanPhamBinhLuanDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxSanPhamBinhLuanDataGridView.Name = "uxSanPhamBinhLuanDataGridView";
			this.uxSanPhamBinhLuanDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxSanPhamBinhLuanDataGridView.TabIndex = 0;	
			this.uxSanPhamBinhLuanDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxSanPhamBinhLuanDataGridView.EnableHeadersVisualStyles = false;
			this.uxSanPhamBinhLuanDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnSanPhamBinhLuanDataGridViewDataError);
			this.uxSanPhamBinhLuanDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnSanPhamBinhLuanDataGridViewCellValueNeeded);
			this.uxSanPhamBinhLuanDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnSanPhamBinhLuanDataGridViewCellValuePushed);
			
			//
			// uxIDSanPhamBinhLuanDataGridViewColumn
			//
			this.uxIDSanPhamBinhLuanDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDSanPhamBinhLuanDataGridViewColumn.DataPropertyName = "IDSanPhamBinhLuan";
			this.uxIDSanPhamBinhLuanDataGridViewColumn.HeaderText = "IDSanPhamBinhLuan";
			this.uxIDSanPhamBinhLuanDataGridViewColumn.Name = "uxIDSanPhamBinhLuanDataGridViewColumn";
			this.uxIDSanPhamBinhLuanDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDSanPhamBinhLuanDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDSanPhamBinhLuanDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDSanPhamDataGridViewColumn
			//
			this.uxIDSanPhamDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDSanPhamDataGridViewColumn.DataPropertyName = "IDSanPham";
			this.uxIDSanPhamDataGridViewColumn.HeaderText = "IDSanPham";
			this.uxIDSanPhamDataGridViewColumn.Name = "uxIDSanPhamDataGridViewColumn";
			this.uxIDSanPhamDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDSanPhamDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDSanPhamDataGridViewColumn.ReadOnly = false;		
			//
			// uxTenSuDungDataGridViewColumn
			//
			this.uxTenSuDungDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTenSuDungDataGridViewColumn.DataPropertyName = "TenSuDung";
			this.uxTenSuDungDataGridViewColumn.HeaderText = "TenSuDung";
			this.uxTenSuDungDataGridViewColumn.Name = "uxTenSuDungDataGridViewColumn";
			this.uxTenSuDungDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTenSuDungDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTenSuDungDataGridViewColumn.ReadOnly = false;		
			//
			// uxTenNguoiDungDataGridViewColumn
			//
			this.uxTenNguoiDungDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTenNguoiDungDataGridViewColumn.DataPropertyName = "TenNguoiDung";
			this.uxTenNguoiDungDataGridViewColumn.HeaderText = "TenNguoiDung";
			this.uxTenNguoiDungDataGridViewColumn.Name = "uxTenNguoiDungDataGridViewColumn";
			this.uxTenNguoiDungDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTenNguoiDungDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTenNguoiDungDataGridViewColumn.ReadOnly = false;		
			//
			// uxEmailDataGridViewColumn
			//
			this.uxEmailDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxEmailDataGridViewColumn.DataPropertyName = "Email";
			this.uxEmailDataGridViewColumn.HeaderText = "Email";
			this.uxEmailDataGridViewColumn.Name = "uxEmailDataGridViewColumn";
			this.uxEmailDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxEmailDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxEmailDataGridViewColumn.ReadOnly = false;		
			//
			// uxNoiDungDataGridViewColumn
			//
			this.uxNoiDungDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxNoiDungDataGridViewColumn.DataPropertyName = "NoiDung";
			this.uxNoiDungDataGridViewColumn.HeaderText = "NoiDung";
			this.uxNoiDungDataGridViewColumn.Name = "uxNoiDungDataGridViewColumn";
			this.uxNoiDungDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxNoiDungDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxNoiDungDataGridViewColumn.ReadOnly = false;		
			//
			// uxThoiDiemCapNhatDataGridViewColumn
			//
			this.uxThoiDiemCapNhatDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThoiDiemCapNhatDataGridViewColumn.DataPropertyName = "ThoiDiemCapNhat";
			this.uxThoiDiemCapNhatDataGridViewColumn.HeaderText = "ThoiDiemCapNhat";
			this.uxThoiDiemCapNhatDataGridViewColumn.Name = "uxThoiDiemCapNhatDataGridViewColumn";
			this.uxThoiDiemCapNhatDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThoiDiemCapNhatDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThoiDiemCapNhatDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDSanPhamDataGridViewColumn
			//				
			this.uxIDSanPhamDataGridViewColumn.DisplayMember = "IDSanPhamDanhMuc";	
			this.uxIDSanPhamDataGridViewColumn.ValueMember = "IDSanPham";	
			this.uxIDSanPhamDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDSanPhamDataGridViewColumn.DataSource = uxIDSanPhamBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxSanPhamBinhLuanDataGridView);
			this.Name = "SanPhamBinhLuanDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDSanPhamBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxSanPhamBinhLuanErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxSanPhamBinhLuanDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxSanPhamBinhLuanBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				SanPhamBinhLuanDataGridViewEventArgs args = new SanPhamBinhLuanDataGridViewEventArgs();
				args.SanPhamBinhLuan = _currentSanPhamBinhLuan;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class SanPhamBinhLuanDataGridViewEventArgs : System.EventArgs
		{
			private Entities.SanPhamBinhLuan	_SanPhamBinhLuan;
	
			/// <summary>
			/// the  Entities.SanPhamBinhLuan instance.
			/// </summary>
			public Entities.SanPhamBinhLuan SanPhamBinhLuan
			{
				get { return _SanPhamBinhLuan; }
				set { _SanPhamBinhLuan = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxSanPhamBinhLuanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnSanPhamBinhLuanDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxSanPhamBinhLuanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnSanPhamBinhLuanDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxSanPhamBinhLuanDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDSanPhamBinhLuanDataGridViewColumn":
						e.Value = SanPhamBinhLuanList[e.RowIndex].IDSanPhamBinhLuan;
						break;
					case "uxIDSanPhamDataGridViewColumn":
						e.Value = SanPhamBinhLuanList[e.RowIndex].IDSanPham;
						break;
					case "uxTenSuDungDataGridViewColumn":
						e.Value = SanPhamBinhLuanList[e.RowIndex].TenSuDung;
						break;
					case "uxTenNguoiDungDataGridViewColumn":
						e.Value = SanPhamBinhLuanList[e.RowIndex].TenNguoiDung;
						break;
					case "uxEmailDataGridViewColumn":
						e.Value = SanPhamBinhLuanList[e.RowIndex].Email;
						break;
					case "uxNoiDungDataGridViewColumn":
						e.Value = SanPhamBinhLuanList[e.RowIndex].NoiDung;
						break;
					case "uxThoiDiemCapNhatDataGridViewColumn":
						e.Value = SanPhamBinhLuanList[e.RowIndex].ThoiDiemCapNhat;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxSanPhamBinhLuanDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnSanPhamBinhLuanDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxSanPhamBinhLuanDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDSanPhamBinhLuanDataGridViewColumn":
						SanPhamBinhLuanList[e.RowIndex].IDSanPhamBinhLuan = (System.Guid)e.Value;
						break;
					case "uxIDSanPhamDataGridViewColumn":
						SanPhamBinhLuanList[e.RowIndex].IDSanPham = (System.Guid)e.Value;
						break;
					case "uxTenSuDungDataGridViewColumn":
						SanPhamBinhLuanList[e.RowIndex].TenSuDung = (System.String)e.Value;
						break;
					case "uxTenNguoiDungDataGridViewColumn":
						SanPhamBinhLuanList[e.RowIndex].TenNguoiDung = (System.String)e.Value;
						break;
					case "uxEmailDataGridViewColumn":
						SanPhamBinhLuanList[e.RowIndex].Email = (System.String)e.Value;
						break;
					case "uxNoiDungDataGridViewColumn":
						SanPhamBinhLuanList[e.RowIndex].NoiDung = (System.String)e.Value;
						break;
					case "uxThoiDiemCapNhatDataGridViewColumn":
						SanPhamBinhLuanList[e.RowIndex].ThoiDiemCapNhat = (System.DateTime)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
